using System;
using Sce.Pss.Core.Input;

namespace RedSkies
{
	public static class GamepadDataExtended
	{
		public static bool IsCrossPressed (this GamePadData gamePadData)
		{
			return (gamePadData.Buttons & GamePadButtons.Cross) != 0;
		}
		
		public static bool IsCirclePressed (this GamePadData gamePadData)
		{
			return (gamePadData.Buttons & GamePadButtons.Circle) != 0;
		}
		
		public static bool IsTrianglePressed (this GamePadData gamePadData)
		{
			return (gamePadData.Buttons & GamePadButtons.Triangle) != 0;
		}

		public static bool IsSquarePressed (this GamePadData gamePadData)
		{
			return (gamePadData.Buttons & GamePadButtons.Square) != 0;
		}
		
		public static bool IsLeftPressed (this GamePadData gamePadData)
		{
			return (gamePadData.Buttons & GamePadButtons.Left) != 0;
		}

		public static bool IsRightPressed (this GamePadData gamePadData)
		{
			return (gamePadData.Buttons & GamePadButtons.Right) != 0;
		}

		public static bool IsUpPressed (this GamePadData gamePadData)
		{
			return (gamePadData.Buttons & GamePadButtons.Up) != 0;
		}

		public static bool IsDownPressed (this GamePadData gamePadData)
		{
			return (gamePadData.Buttons & GamePadButtons.Down) != 0;
		}

		public static bool IsL1Pressed (this GamePadData gamePadData)
		{
			return (gamePadData.Buttons & GamePadButtons.L) != 0;
		}
		
		public static bool IsR1Pressed (this GamePadData gamePadData)
		{
			return (gamePadData.Buttons & GamePadButtons.R) != 0;
		}
	}
}

